<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>New Error Messages</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="migration52.incompatible.html">Backward Incompatible Changes</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="migration52.datetime.html">Changes in PHP datetime
   support</a></div>
 <div class="up"><a href="migration52.html">Migrating from PHP 5.1.x to PHP 5.2.x</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="migration52.error-messages" class="section">
  <h2 class="title">New Error Messages</h2>
  <p class="para">
   Below are the new error messages that have not been discussed 
   elsewhere in this document.
  </p>
  <p class="para">
   <div class="example" id="example-5488">
    <p><strong>Example #1 In PHP Core</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"&nbsp;"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">session_regenerate_id</span><span style="color: #007700">();<br /></span><span style="color: #FF8000">/*&nbsp;&nbsp;Warning:&nbsp;&nbsp;session_regenerate_id():&nbsp;Cannot&nbsp;regenerate<br />&nbsp;&nbsp;&nbsp;&nbsp;session&nbsp;id&nbsp;-&nbsp;headers&nbsp;already&nbsp;sent&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /><br /></span><span style="color: #0000BB">str_word_count</span><span style="color: #007700">(</span><span style="color: #DD0000">"string"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;Warning:&nbsp;&nbsp;str_word_count():&nbsp;Invalid&nbsp;format&nbsp;value&nbsp;4<br />&nbsp;&nbsp;&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /><br /></span><span style="color: #0000BB">strripos</span><span style="color: #007700">(</span><span style="color: #DD0000">"foo"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"f"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;Notice:&nbsp;&nbsp;strripos():&nbsp;Offset&nbsp;is&nbsp;greater&nbsp;than&nbsp;the<br />&nbsp;&nbsp;&nbsp;length&nbsp;of&nbsp;haystack&nbsp;string&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /><br /></span><span style="color: #0000BB">strrpos</span><span style="color: #007700">(</span><span style="color: #DD0000">"foo"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"f"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;Notice:&nbsp;&nbsp;strrpos():&nbsp;Offset&nbsp;is&nbsp;greater&nbsp;than&nbsp;the<br />&nbsp;&nbsp;&nbsp;length&nbsp;of&nbsp;haystack&nbsp;string&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /><br />/*&nbsp;As&nbsp;of&nbsp;PHP&nbsp;5.2.1,&nbsp;when&nbsp;allow_url_include&nbsp;is&nbsp;OFF&nbsp;(default)&nbsp;*/<br /></span><span style="color: #007700">include&nbsp;</span><span style="color: #DD0000">"php://input"</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">/*&nbsp;Warning:&nbsp;&nbsp;include():&nbsp;URL&nbsp;file-access&nbsp;is&nbsp;disabled<br />&nbsp;&nbsp;&nbsp;in&nbsp;the&nbsp;server&nbsp;configuration&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
  <p class="para">
   <div class="example" id="example-5489">
    <p><strong>Example #2 <a href="language.oop5.html" class="link">Object Oriented Code</a> in PHP Core</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">interface&nbsp;</span><span style="color: #0000BB">foo&nbsp;</span><span style="color: #007700">{<br />}<br />class&nbsp;</span><span style="color: #0000BB">bar&nbsp;</span><span style="color: #007700">implements&nbsp;</span><span style="color: #0000BB">foo</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">foo&nbsp;</span><span style="color: #007700">{<br />}<br /></span><span style="color: #FF8000">/*&nbsp;Fatal&nbsp;error:&nbsp;Class&nbsp;bar&nbsp;cannot&nbsp;implement&nbsp;previously<br />&nbsp;&nbsp;&nbsp;implemented&nbsp;interface&nbsp;foo&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /><br /><br /></span><span style="color: #007700">class&nbsp;</span><span style="color: #0000BB">foo&nbsp;</span><span style="color: #007700">{<br />&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;</span><span style="color: #0000BB">$bar</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;</span><span style="color: #0000BB">__get</span><span style="color: #007700">(</span><span style="color: #0000BB">$var</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">bar</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /><br /></span><span style="color: #0000BB">$foo&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">foo</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$bar&nbsp;</span><span style="color: #007700">=&amp;&nbsp;</span><span style="color: #0000BB">$foo</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">prop</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">/*&nbsp;Notice:&nbsp;Indirect&nbsp;modification&nbsp;of&nbsp;overloaded&nbsp;property<br />&nbsp;&nbsp;&nbsp;foo::$prop&nbsp;has&nbsp;no&nbsp;effect&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /><br /><br /></span><span style="color: #007700">class&nbsp;</span><span style="color: #0000BB">foo&nbsp;</span><span style="color: #007700">implements&nbsp;</span><span style="color: #0000BB">iterator&nbsp;</span><span style="color: #007700">{<br />&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;</span><span style="color: #0000BB">current</span><span style="color: #007700">()&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;</span><span style="color: #0000BB">next</span><span style="color: #007700">()&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;</span><span style="color: #0000BB">key</span><span style="color: #007700">()&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;</span><span style="color: #0000BB">valid</span><span style="color: #007700">()&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;</span><span style="color: #0000BB">rewind</span><span style="color: #007700">()&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /><br /></span><span style="color: #0000BB">$foo&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">foo</span><span style="color: #007700">();<br />foreach(</span><span style="color: #0000BB">$foo&nbsp;</span><span style="color: #007700">as&nbsp;&amp;</span><span style="color: #0000BB">$ref</span><span style="color: #007700">)&nbsp;{}<br /></span><span style="color: #FF8000">/*&nbsp;Fatal&nbsp;error:&nbsp;An&nbsp;iterator&nbsp;cannot&nbsp;be&nbsp;used&nbsp;with&nbsp;foreach<br />&nbsp;&nbsp;&nbsp;by&nbsp;reference&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /><br /><br /></span><span style="color: #007700">class&nbsp;</span><span style="color: #0000BB">foo&nbsp;</span><span style="color: #007700">{<br />&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;function&nbsp;</span><span style="color: #0000BB">__construct</span><span style="color: #007700">()&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br />class&nbsp;</span><span style="color: #0000BB">bar&nbsp;</span><span style="color: #007700">extends&nbsp;</span><span style="color: #0000BB">foo&nbsp;</span><span style="color: #007700">{<br />&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;</span><span style="color: #0000BB">__construct</span><span style="color: #007700">()&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">parent</span><span style="color: #007700">::</span><span style="color: #0000BB">__construct</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">/*&nbsp;Fatal&nbsp;error:&nbsp;&nbsp;Cannot&nbsp;call&nbsp;private<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foo::__construct()&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">}<br />}<br />new&nbsp;</span><span style="color: #0000BB">bar</span><span style="color: #007700">;<br /><br /><br /></span><span style="color: #0000BB">stream_filter_register</span><span style="color: #007700">(</span><span style="color: #DD0000">""</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"class"</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;Warning:&nbsp;&nbsp;stream_filter_register():&nbsp;Filter&nbsp;name<br />&nbsp;&nbsp;&nbsp;cannot&nbsp;be&nbsp;empty&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /><br /><br /></span><span style="color: #0000BB">stream_filter_register</span><span style="color: #007700">(</span><span style="color: #DD0000">"filter"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;Warning:&nbsp;&nbsp;stream_filter_register():&nbsp;Class&nbsp;name<br />&nbsp;&nbsp;&nbsp;cannot&nbsp;be&nbsp;empty&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
  <p class="para">
   <div class="example" id="example-5490">
    <p><strong>Example #3 In the <a href="ref.bzip2.html" class="link">bzip2</a> Extension</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />bzopen</span><span style="color: #007700">(</span><span style="color: #DD0000">""</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"w"</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;Warning:&nbsp;&nbsp;bzopen():&nbsp;filename&nbsp;cannot&nbsp;be&nbsp;empty<br />&nbsp;&nbsp;&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /><br /></span><span style="color: #0000BB">bzopen</span><span style="color: #007700">(</span><span style="color: #DD0000">"foo"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"a"</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;Warning:&nbsp;&nbsp;bzopen():&nbsp;'a'&nbsp;is&nbsp;not&nbsp;a&nbsp;valid&nbsp;mode&nbsp;for<br />&nbsp;&nbsp;&nbsp;bzopen().&nbsp;Only&nbsp;'w'&nbsp;and&nbsp;'r'&nbsp;are&nbsp;supported&nbsp;in<br />&nbsp;&nbsp;&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /><br /></span><span style="color: #0000BB">$fp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #DD0000">"foo"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"w"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">bzopen</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"r"</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;Warning:&nbsp;&nbsp;bzopen():&nbsp;cannot&nbsp;read&nbsp;from&nbsp;a&nbsp;stream<br />&nbsp;&nbsp;&nbsp;opened&nbsp;in&nbsp;write&nbsp;only&nbsp;mode&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
  <p class="para">
   <div class="example" id="example-5491">
    <p><strong>Example #4 In the <a href="ref.datetime.html" class="link">datetime</a> Extension</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />strtotime</span><span style="color: #007700">(</span><span style="color: #DD0000">"today"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"now"</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;Warning:&nbsp;&nbsp;strtotime()&nbsp;expects&nbsp;parameter&nbsp;2&nbsp;to&nbsp;be<br />&nbsp;&nbsp;&nbsp;long,&nbsp;string&nbsp;given&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /><br />/*&nbsp;As&nbsp;of&nbsp;PHP&nbsp;5.2.1&nbsp;*/<br /></span><span style="color: #007700">new&nbsp;</span><span style="color: #0000BB">DateTime</span><span style="color: #007700">(new&nbsp;</span><span style="color: #0000BB">stdclass</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;Fatal&nbsp;error:&nbsp;Uncaught&nbsp;exception&nbsp;'Exception'&nbsp;with<br />&nbsp;&nbsp;&nbsp;message&nbsp;'DateTime::__construct()&nbsp;expects&nbsp;parameter<br />&nbsp;&nbsp;&nbsp;1&nbsp;to&nbsp;be&nbsp;string,&nbsp;object&nbsp;given'&nbsp;in&nbsp;filename:n&nbsp;*/<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
  <p class="para">
   <div class="example" id="example-5492">
    <p><strong>Example #5 In the <a href="ref.dbase.html" class="link">dBase</a> Extension</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />dbase_open</span><span style="color: #007700">(</span><span style="color: #DD0000">"foo"</span><span style="color: #007700">,&nbsp;-</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;Warning:&nbsp;Invalid&nbsp;access&nbsp;mode&nbsp;-1&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /><br />/*&nbsp;As&nbsp;of&nbsp;PHP&nbsp;5.2.1&nbsp;*/<br /></span><span style="color: #0000BB">dbase_open</span><span style="color: #007700">(</span><span style="color: #DD0000">"foo"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">null</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;Warning:&nbsp;The&nbsp;filename&nbsp;cannot&nbsp;be&nbsp;empty&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
  <p class="para">
   <div class="example" id="example-5493">
    <p><strong>Example #6 In the <a href="ref.mcrypt.html" class="link">mcrypt</a> Extension</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$key&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"this&nbsp;is&nbsp;a&nbsp;secret&nbsp;key"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$td&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">mcrypt_module_open</span><span style="color: #007700">(</span><span style="color: #DD0000">'tripledes'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'ecb'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$iv&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">mcrypt_create_iv&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">mcrypt_enc_get_iv_size</span><span style="color: #007700">(</span><span style="color: #0000BB">$td</span><span style="color: #007700">),<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">MCRYPT_RAND</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">mcrypt_generic_init</span><span style="color: #007700">(</span><span style="color: #0000BB">$td</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$key</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$iv</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$encrypted_data&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">mcrypt_generic</span><span style="color: #007700">(</span><span style="color: #0000BB">$td</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;Warning:&nbsp;mcrypt_generic():&nbsp;An&nbsp;empty&nbsp;string&nbsp;was<br />&nbsp;&nbsp;&nbsp;passed&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
  <p class="para">
   <div class="example" id="example-5494">
    <p><strong>Example #7 In the <a href="ref.oci8.html" class="link">oci8</a> Extension</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />oci_connect</span><span style="color: #007700">(</span><span style="color: #DD0000">"user"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"pass"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"db"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"bogus_charset"</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;Warning:&nbsp;Invalid&nbsp;character&nbsp;set&nbsp;name:<br />&nbsp;&nbsp;&nbsp;bogus_charset&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /><br /></span><span style="color: #0000BB">$oci&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">oci_connect</span><span style="color: #007700">(</span><span style="color: #DD0000">"user"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"pass"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"db"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">oci_password_change</span><span style="color: #007700">(</span><span style="color: #0000BB">$oci</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"old"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"new"</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;Warning:&nbsp;username&nbsp;cannot&nbsp;be&nbsp;empty&nbsp;in&nbsp;filename<br />&nbsp;&nbsp;&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /><br /></span><span style="color: #0000BB">oci_password_change</span><span style="color: #007700">(</span><span style="color: #0000BB">$oci</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"user"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"new"</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;Warning:&nbsp;old&nbsp;password&nbsp;cannot&nbsp;be&nbsp;empty&nbsp;in&nbsp;filename<br />&nbsp;&nbsp;&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /><br /></span><span style="color: #0000BB">oci_password_change</span><span style="color: #007700">(</span><span style="color: #0000BB">$oci</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"user"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"old"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;Warning:&nbsp;new&nbsp;password&nbsp;cannot&nbsp;be&nbsp;empty&nbsp;in&nbsp;filename<br />&nbsp;&nbsp;&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
  <p class="para">
   <div class="example" id="example-5495">
    <p><strong>Example #8 In the <a href="ref.spl.html" class="link">SPL</a> Extension</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$obj&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">SplFileObject</span><span style="color: #007700">(</span><span style="color: #0000BB">__FILE__</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$obj</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">fgetcsv</span><span style="color: #007700">(</span><span style="color: #DD0000">"foo"</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;Warning:&nbsp;&nbsp;SplFileObject::fgetcsv():&nbsp;delimiter&nbsp;must<br />&nbsp;&nbsp;&nbsp;be&nbsp;a&nbsp;character&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /><br /></span><span style="color: #0000BB">$obj</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">fgetcsv</span><span style="color: #007700">(</span><span style="color: #DD0000">","</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"foo"</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;Warning:&nbsp;&nbsp;SplFileObject::fgetcsv():&nbsp;enclosure&nbsp;must<br />&nbsp;&nbsp;&nbsp;be&nbsp;a&nbsp;character&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
  <p class="para">
   <div class="example" id="example-5496">
    <p><strong>Example #9 In the <a href="ref.sem.html" class="link">Semaphore</a> (sysvmsg) extension</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">/*&nbsp;Warning:&nbsp;&nbsp;maximum&nbsp;size&nbsp;of&nbsp;the&nbsp;message&nbsp;has&nbsp;to&nbsp;be<br />&nbsp;&nbsp;&nbsp;greater&nbsp;then&nbsp;zero&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
  <p class="para">
   <div class="example" id="example-5497">
    <p><strong>Example #10 A 5.2.1+ <a href="ref.zip.html" class="link">Zip</a> Example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$obj&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">ZipArchive</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$obj</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">open</span><span style="color: #007700">(</span><span style="color: #DD0000">'archive.zip'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$obj</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">setCommentName</span><span style="color: #007700">(</span><span style="color: #DD0000">''</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'comment'</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;Notice:&nbsp;&nbsp;ZipArchive::setCommentName():&nbsp;Empty&nbsp;string<br />&nbsp;&nbsp;&nbsp;as&nbsp;entry&nbsp;name&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /><br />/*&nbsp;As&nbsp;of&nbsp;PHP&nbsp;5.2.1&nbsp;*/<br /></span><span style="color: #0000BB">$obj</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getCommentName</span><span style="color: #007700">(</span><span style="color: #DD0000">''</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/*&nbsp;Notice:&nbsp;&nbsp;ZipArchive::getCommentName():&nbsp;Empty&nbsp;string<br />&nbsp;&nbsp;&nbsp;as&nbsp;entry&nbsp;name&nbsp;in&nbsp;filename&nbsp;on&nbsp;line&nbsp;n&nbsp;*/<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="migration52.incompatible.html">Backward Incompatible Changes</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="migration52.datetime.html">Changes in PHP datetime
   support</a></div>
 <div class="up"><a href="migration52.html">Migrating from PHP 5.1.x to PHP 5.2.x</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
